/*
 * @Author: quit
 * @Date: 2021-11-15 17:11:30
 * @LastEditTime: 2021-12-07 17:16:31
 * @Descripttion: 路由表共享,在navbar中使用
 */

import BmRoutes from '@/router/modules/BmRoutes'
import BotRoutes from '@/router/modules/BotRoutes'
import FdaRoutes from '@/router/modules/FdaRoutes'
import { getData, setData, removeData } from '@/utils/auth'
const state = {
  BmRoutes,
  BotRoutes,
  FdaRoutes,
  BotState: getData('BotData') || {}
}

const mutations = {
  /**
   * @description: 存储项目信息
   * @param {*} data
   */
  VueXSetBotState(state, data) {
    state.BotState = data
    setData('BotData', data)
  },
  /**
   * @description: 删除项目信息
   */
  VueXreomveBotState() {
    state.BotState = {}
    removeData('BotData')
  }
}

const actions = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
